summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/(system)
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-11-17 12:06:56 +0900
committerjoonhoekim <26rote@gmail.com>2025-11-17 12:06:56 +0900
commitb9ce61033c2f5bc6ec8eb3db200b96058f013bf8 (patch)
tree2366c08f7120fcf49ca3f36c290a2f97d3b0a551 /app/[lng]/evcp/(evcp)/(system)
parent182dfce1ba5381389a0df05cd9d4a2ea541b229d (diff)
(김준회) 오류 수정: params and searchParams: Nextjs 15부터 Promise 타입으로 변경됨: 서버 컴포넌트에서는 await으로 resolve 하도록 처리, Promise 타입 명시적으로 추가(Generic)
Diffstat (limited to 'app/[lng]/evcp/(evcp)/(system)')
-rw-r--r--app/[lng]/evcp/(evcp)/(system)/approval/line/page.tsx5
-rw-r--r--app/[lng]/evcp/(evcp)/(system)/approval/template/page.tsx5
-rw-r--r--app/[lng]/evcp/(evcp)/(system)/email-log/page.tsx2
-rw-r--r--app/[lng]/evcp/(evcp)/(system)/email-template/page.tsx3
-rw-r--r--app/[lng]/evcp/(evcp)/(system)/qna/[id]/page.tsx5
5 files changed, 11 insertions, 9 deletions
diff --git a/app/[lng]/evcp/(evcp)/(system)/approval/line/page.tsx b/app/[lng]/evcp/(evcp)/(system)/approval/line/page.tsx
index 38b43680..2e96b434 100644
--- a/app/[lng]/evcp/(evcp)/(system)/approval/line/page.tsx
+++ b/app/[lng]/evcp/(evcp)/(system)/approval/line/page.tsx
@@ -15,10 +15,11 @@ export const metadata: Metadata = {
};
interface PageProps {
- searchParams: SearchParams;
+ searchParams: Promise<SearchParams>;
}
-export default async function ApprovalLinePage({ searchParams }: PageProps) {
+export default async function ApprovalLinePage(props: PageProps) {
+ const searchParams = await props.searchParams;
const search = SearchParamsApprovalLineCache.parse(searchParams);
// getValidFilters 반환값이 undefined 인 경우 폴백
const validFilters = getValidFilters(search.filters) ?? [];
diff --git a/app/[lng]/evcp/(evcp)/(system)/approval/template/page.tsx b/app/[lng]/evcp/(evcp)/(system)/approval/template/page.tsx
index f475099c..c5834b05 100644
--- a/app/[lng]/evcp/(evcp)/(system)/approval/template/page.tsx
+++ b/app/[lng]/evcp/(evcp)/(system)/approval/template/page.tsx
@@ -15,10 +15,11 @@ export const metadata: Metadata = {
};
interface PageProps {
- searchParams: SearchParams;
+ searchParams: Promise<SearchParams>;
}
-export default async function ApprovalTemplatePage({ searchParams }: PageProps) {
+export default async function ApprovalTemplatePage(props: PageProps) {
+ const searchParams = await props.searchParams;
const search = SearchParamsApprovalTemplateCache.parse(searchParams);
// getValidFilters 반환값이 undefined 인 경우 폴백
const validFilters = getValidFilters(search.filters) ?? [];
diff --git a/app/[lng]/evcp/(evcp)/(system)/email-log/page.tsx b/app/[lng]/evcp/(evcp)/(system)/email-log/page.tsx
index b73674e4..41001cc7 100644
--- a/app/[lng]/evcp/(evcp)/(system)/email-log/page.tsx
+++ b/app/[lng]/evcp/(evcp)/(system)/email-log/page.tsx
@@ -14,7 +14,7 @@ export const metadata: Metadata = {
}
interface EmailLogPageProps {
- searchParams: SearchParams
+ searchParams: Promise<SearchParams>
}
export default async function EmailLogPage(props: EmailLogPageProps) {
diff --git a/app/[lng]/evcp/(evcp)/(system)/email-template/page.tsx b/app/[lng]/evcp/(evcp)/(system)/email-template/page.tsx
index 7f4de341..16c75dab 100644
--- a/app/[lng]/evcp/(evcp)/(system)/email-template/page.tsx
+++ b/app/[lng]/evcp/(evcp)/(system)/email-template/page.tsx
@@ -22,11 +22,10 @@ export const metadata: Metadata = {
}
interface TemplatePageProps {
- searchParams: SearchParams
+ searchParams: Promise<SearchParams>
}
export default async function TemplatePage(props: TemplatePageProps) {
-
const searchParams = await props.searchParams
const search = SearchParamsEmailTemplateCache.parse(searchParams)
diff --git a/app/[lng]/evcp/(evcp)/(system)/qna/[id]/page.tsx b/app/[lng]/evcp/(evcp)/(system)/qna/[id]/page.tsx
index 93b948c6..ebd4cbb3 100644
--- a/app/[lng]/evcp/(evcp)/(system)/qna/[id]/page.tsx
+++ b/app/[lng]/evcp/(evcp)/(system)/qna/[id]/page.tsx
@@ -2,8 +2,9 @@ import { getQnaById } from "@/lib/qna/service";
import QnaDetail from "@/lib/qna/table/qna-detail";
import { notFound } from "next/navigation";
-export default async function QnaDetailPage({ params }: { params: { id: string } }) {
- const question = await getQnaById(params.id);
+export default async function QnaDetailPage({ params }: { params: Promise<{ id: string }> }) {
+ const resolvedParams = await params;
+ const question = await getQnaById(resolvedParams.id);
if (!question) {
notFound();